
cc.Class({
    extends: cc.Component,

    properties: {
		txt:cc.Label,
    },

    onLoad () {
		cc.director.once('alerttext', function (e) {
			this.txt.string = e;
		}, this);

		//后期要注意避免小提示框太多
		this.selfkill(3);
		

	},
	selfkill(djs){
		//cc.log('====alertnode selfkill====');
		//cc.director.getScheduler().enableForTarget(this);//失效
		//cc.director.getScheduler().schedule(this.heartBeat,this,1,false);//失效
		cc.director.getScheduler().schedule(()=>{
			this.node.destroy();
		},this,3,cc.macro.REPEAT_FOREVER,0,false);

	},
});
